All computer systems require electrical power to operate. In many instances, it is desirable to manage electrical power to a computer system, responsive to near-term requirements or observed usage, prior settings, etc. For instance, a computer may be configured such that after some number of minutes without activity, the computer may spin down its hard drives, remove power from its graphics output, power down its network interface card(s), slow or halt its central processing unit, etc. After additional time passes, the computer may automatically enter a suspend state where, except for low-power memory self-refresh operations, all computer functions draw essentially zero current. The computer may even be placed in a hibernate state, where an image of memory is saved to hard disk and the computer is completely powered down, with its hibernation state saved indefinitely.
For portable, battery-powered computers, power management is almost essential if the computer is expected to run on battery power for more than an hour or two. And even with stationary computers that rely on a building's electrical power supply, significant reductions in electricity usage are possible with computers that utilize effective power management.
Several specifications have been developed in the interest of effecting robust computer power management. Intel Corporation and Microsoft Corporation released one such specification that has enjoyed wide adoption, Advanced Power Management (APM) BIOS Interface Specification, Rev. 1.2, February 1996 (and previous versions). FIG. 1 illustrates the general structure of an APM implementation. An APM BIOS (Basic Input/Output System) 30 provides a software interface to those power-managed hardware subsystems 35 located in the standard computer configuration (e.g., motherboard devices and some attached components).
Although some limited power management is often possible with the APM BIOS alone, more comprehensive power management generally requires the cooperation of an operating-system-resident APM driver. An APM interface 45 is standardized for operating system (OS) communication with APM-compliant BIOS software. An operating system vendor desiring to utilize APM functionality supplies an APM driver 40 that also complies with the APM interface specification. The APM driver calls APM BIOS functions to accomplish APM tasks. The APM BIOS expects to be polled frequently (e.g., at least once/second) by the APM driver for the occurrence of power management events.
For each OS using an APM driver, the OS vendor determines how it will involve APM-aware applications (e.g., 50 and 55), and in some cases APM-aware device drivers (e.g., 60 and 70) that provide power control for an add-in device (e.g., 65 and 75), such as a PCI (Peripheral Component Interconnect) device. In many Microsoft Windows® OS implementations, for instance, APM driver 40 places messages in the message loop of registered applications, to notify the applications of a power event. The messages allow those applications to take necessary actions before a power event occurs, or in some cases to even prevent the power event from occurring.
A second, more ambitious approach to power management is described in Advanced Configuration and Power Interface Specification, Rev. 2.0a, Mar. 31, 2002, hereinafter referred to as ACPI. ACPI uses different interrupt mechanisms than APM, and defines global system states, device power states, and processor power states. A more detailed understanding of ACPI is not necessary for understanding of the invention described herein, as embodiments of the present invention generally solve problems not present with ACPI systems.